package com.temp.dto;

import com.temp.annotation.Xss;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * C端用户登录
 */
@Data
public class UserLoginDTO implements Serializable {

    @NotBlank(message = "apiMsg.emailNotNull")
    @Email(message = "apiMsg.emailNotTrue")
    @Xss(message = "apiMsg.emailXss")
    private String email;

    @NotBlank(message = "apiMsg.passwordNotNull")
    @Length(min = 6, max = 20, message = "apiMsg.passwordRange,6~20")
    private String password;

}
